import React, { Component } from 'react';
import {NavLink} from 'react-router-dom';
import './index.css';
import RouterView from '../../router/router-view';
import {RouteItemProp} from '../../router/type.d';

interface Iprops{
    routes:RouteItemProp[]
}

export default class Main extends Component<Iprops> {
    render() {
        return (
            <div className="wraper">
                <div className="con">
                    <RouterView routes={this.props.routes}></RouterView>
                </div>
                <footer>
                    <NavLink to="/main/recommend">推荐</NavLink>
                    <NavLink to="/main/classify">分类</NavLink>
                    <NavLink to="/main/food">食材</NavLink>
                    <NavLink to="/main/my">我的</NavLink>
                </footer>
            </div>
        )
    }
}
